package cau.se.project.view;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;

public class AboutListener implements SelectionListener {
	
	// If About menu is selected, message box will pop up with this context
	
	@Override
	public void widgetSelected(SelectionEvent e) {
	    Shell shell = new Shell();

	    int style = SWT.ICON_INFORMATION |SWT.OK;
	    
	    String output = "2012 Software Engnieering Project\n\n";
		
	    output += "팀원:\n";
		output += "20070883 민태원\n";
		output += "20081388 권순의\n";
		output += "20081418 박재민\n";
		output += "20091492 서민관\n";
		output += "20091498 신민섭\n";
	   
	    MessageBox messageBox = new MessageBox(shell, style);
	    messageBox.setText("Dependency Editor - 2012 SE Project");
	    messageBox.setMessage(output);
	    messageBox.open();
	}

	@Override
	public void widgetDefaultSelected(SelectionEvent e) {
	    Shell shell = new Shell();

	    int style = SWT.ICON_INFORMATION |SWT.OK;
	    
	    String output = "2012 Software Engnieering Project\n\n";
		
	    output += "팀원:\n";
		output += "20070883 민태원\n";
		output += "20081388 권순의\n";
		output += "20081418 박재민\n";
		output += "20091492 서민관\n";
		output += "20091498 신민섭\n";
	   
	    MessageBox messageBox = new MessageBox(shell, style);
	    messageBox.setMessage(output);
	    messageBox.open();
	}

}
